home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-02 | 3.2 KB | 76 lines | [TEXT/R*ch] |
- Scripting Changes in BBEdit 3.5.2
- --------- ------- -- ------ -----
-
- In BBEdit 3.5.2, we are pleased to introduce partial support for the
- Apple Event Object Model ("object model", or "AEOM" for short) into
- BBEdit's scripting implementation.
-
- In general terms, the object model provides access to items in an
- application as individual objects, or "elements". In the context of
- BBEdit, support for the Object Model makes it possible for you to refer
- to the contents of an editing window as individual elements: characters,
- words, and lines.
-
- Previous versions of BBEdit did not offer this level of access to the
- text, and so performing script-based text transformations with BBEdit
- was difficult. With support for the object model, the possibilities are
- greatly expanded. We're pleased to bring you these improvements, and
- welcome your comments. We are continually working to improve the level
- of scripting support in BBEdit; look for these improvements to appear in
- future maintenance and major releases of BBEdit.
-
- As always, you should refer to BBEdit's script dictionary for the
- details about what objects and commands are supported. Although we
- cannot provide information about AppleScript syntax or semantics, and we
- cannot write your scripts for you, we will be happy to address any
- questions you may have about BBEdit's specific abilities.
-
- The changes described here are relevant for script writers who have
- already written scripts to control BBEdit. As the result of Object Model
- support, your scripts may require some changes in order to work with
- BBEdit 3.5.2.
-
- - Words, lines, and characters within a specific window can now be
- individually accessed, as in:
-
- get character 1 of line 3 of window 1
- set line 3 of window "untitled" to "abcdef"
-
- - the "window" class has been split into two classes: "window"
- and "document". The "document" class is a superset of the "window"
- class: in addition to the properties specific to a window on the
- screen, the document class contains the properties describing
- an open editing or browsing document window. In most cases,
- you can use "window" and "document" interchangeably.
-
- - The following window properties are obsolete and are no longer
- supported:
-
- character count (use "count of characters in document 1")
- word count (use "count of words in document 1")
- line count (use "count of lines in document 1")
-
- - the "send to back" and "exchange with next" events are no
- longer supported. Instead, set the "index" property of the
- given window:
-
- set the index of window 1 to (count of windows) -- send to back
- set the index of window 2 to 1 -- exchange with next
-
- - the "get search string" event is no longer supported. Instead,
- access the "search string" property of the application:
-
- get the search string -- gets the search string
- set the search string to "my new string" -- sets the search string
-
- (the "replace string" property of the application carries over
- from BBEdit 3.5.1.)
-
- - In the current scripting implementation, most of BBEdit's
- transformation commands still operate on the front document window,
- and do not accept a window or text reference. In the future, this
- will be expanded so that you can, for example, Zap Gremlins on a
- specific range of text.
-
- =end=
-